<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Yang轻博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {{template "common/link.html"}}
</head>
<body class="lay-blog">
{{ template "common/head.html" . }}
<div class="container-wrap">
    <div class="container">
        <div class="contar-wrap">
            <h4 class="item-title">
                <p><i class="layui-icon layui-icon-speaker"></i>公告：<span>欢迎来到我的轻博客</span></p>
            </h4>
            {{ range .nodes }}
            <div class="item">
                <div class="item-box  layer-photos-demo1 layer-photos-demo">
                    <h3><a href="/Node/Details?key={{ .Uuid }}">{{ .Title }}</a></h3>
                    <h5>发布于：<span>{{ date .UpdatedAt "Y-m-d H:i:s"}}</span></h5>
                    <p>{{ .Summary }}</p>
                </div>
                <div class="comment count">
                    <a href="/Auth/Comment/?key={{ .Uuid }}">评论</a>
                    <a onclick="addPraise('{{ .Uuid }}')" class="like">点赞</a>
                </div>
            </div>
            {{ end }}
        </div>
        <div class="item-btn">
            {{ if gt .page 1 }}
            <button class="layui-btn" onclick="window.location.href='Index?page={{ add .page -1}}'">上一页</button>
            {{ end }}
            {{ if lt .page .allpage}}
            <button class="layui-btn" onclick="window.location.href='Index?page={{ add .page  1}}'">下一页</button>
            {{ end }}
        </div>
    </div>
</div>
{{ template "common/footer.html" . }}
<script src="/static/layui/layui.js"></script>
<script src="/static/js/blog.js"></script>
</body>
</html>